#ifndef DATA_H
#define DATA_H

#include <vector>
#include <string>
#include <fstream>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
//#include <opencv/cv.h>

using namespace std;

typedef  vector<string> stringvec;
typedef  vector<int> intvec;

class Data
{
   char *filepath;
   stringvec tags;
   vector<stringvec> records;
   vector<float> weights;

public:
    Data();
    Data(char *_filepath);
    void read1();
    void read2();
    void save(char *pathToFile);
    vector<stringvec> getData();
    stringvec         getRecord(unsigned int i);
    vector<float>     getWeightedQuery(intvec intQuery);
    vector< vector<float> > getNumericalData();
private:
    void changeDataToNumerical();
    void addTags();
    void removeBrackets();
    void removeComas();
    void removeSpaces();
    void lowerLetters();
    void setWeights();
};

#endif // DATA_H
